<html>
<head><meta charset="utf-8"><title>measureme performance · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html">measureme performance</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="161753878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161753878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161753878">(Mar 26 2019 at 11:59)</a>:</h4>
<p>I have a rough prototype integrating <code>measureme</code> with <code>rustc</code>. Here's some quick measurements showing the performance including <a href="https://github.com/rust-lang/measureme/pull/7" target="_blank" title="https://github.com/rust-lang/measureme/pull/7">https://github.com/rust-lang/measureme/pull/7</a>:</p>
<table>
<thead>
<tr>
<th>Test Case</th>
<th>Time taken</th>
<th>Profile output file size</th>
</tr>
</thead>
<tbody>
<tr>
<td>regex baseline rustc</td>
<td>3.2s</td>
<td><em>N/A</em></td>
</tr>
<tr>
<td>regex baseline rustc + <code>-Z self-profile</code></td>
<td>6.1s</td>
<td>423mb</td>
</tr>
<tr>
<td>regex rustc + <code>measureme</code> + <code>-Z self-profile</code></td>
<td>4.0s</td>
<td>19.6mb</td>
</tr>
</tbody>
</table>
<p>The prototype doesn't yet deduplicate query names so the output size should shrink quite a bit more once that is implemented.</p>
<p>cc <span class="user-mention" data-user-id="124287">@mw</span></p>



<a name="161754400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161754400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161754400">(Mar 26 2019 at 12:06)</a>:</h4>
<p>Nice!</p>



<a name="161754415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161754415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161754415">(Mar 26 2019 at 12:06)</a>:</h4>
<p>That's already a big improvement.</p>



<a name="161754583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161754583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161754583">(Mar 26 2019 at 12:09)</a>:</h4>
<p>It would be great to have an end-to-end test case for event serialization &amp; deserialization.</p>



<a name="161754609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161754609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161754609">(Mar 26 2019 at 12:09)</a>:</h4>
<p>then we could test the current serialization sink and later the mmap based one</p>



<a name="161768409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161768409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161768409">(Mar 26 2019 at 14:45)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span>, I opened <a href="https://github.com/rust-lang/measureme/pull/8" target="_blank" title="https://github.com/rust-lang/measureme/pull/8">https://github.com/rust-lang/measureme/pull/8</a> which contains a test case. Seems like the <code>FileSerializationSink</code> works as expected <code>:)</code></p>



<a name="161846534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161846534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161846534">(Mar 27 2019 at 10:34)</a>:</h4>
<p>I've created an implementation of MmapSerializationSink on this branch: <a href="https://github.com/michaelwoerister/measureme/tree/mmap-sink-2" target="_blank" title="https://github.com/michaelwoerister/measureme/tree/mmap-sink-2">https://github.com/michaelwoerister/measureme/tree/mmap-sink-2</a></p>



<a name="161846564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161846564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161846564">(Mar 27 2019 at 10:34)</a>:</h4>
<p>I also added some benchmarks and it looks like the FileSerializationSink is actually faster :/</p>



<a name="161846585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161846585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161846585">(Mar 27 2019 at 10:35)</a>:</h4>
<p>at least on Windows. I'll test later on Linux too.</p>



<a name="161846729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161846729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161846729">(Mar 27 2019 at 10:37)</a>:</h4>
<p>Note that the current MmapSerializationSink implementation creates and anonymous memory map and then writes it out to disk in one go at the end. I tried having a memory map that is directly backed up by a file but that turned out to be more complicated than I have time for right now.</p>



<a name="161846742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161846742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161846742">(Mar 27 2019 at 10:37)</a>:</h4>
<p>I want to try that at some point though.</p>



<a name="161849198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161849198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161849198">(Mar 27 2019 at 11:14)</a>:</h4>
<p>I see similar results on macOS:</p>
<div class="codehilite"><pre><span></span>running 2 tests
test bench_file_serialization_sink ... bench: 188,348,802 ns/iter (+/- 3,373,099)
test bench_mmap_serialization_sink ... bench: 178,566,142 ns/iter (+/- 6,515,375)
</pre></div>



<a name="161852199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161852199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161852199">(Mar 27 2019 at 12:02)</a>:</h4>
<blockquote>
<p>a memory map that is directly backed up by a file</p>
</blockquote>
<p>Gentle reminder that this in basically intrinsically <code>unsafe</code> in Rust terms, as anything on the system can write to that file, invalidating immutability and single-mutable notions with one quick <code>cat</code>.</p>



<a name="161852849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161852849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161852849">(Mar 27 2019 at 12:13)</a>:</h4>
<p>These are the Linux numbers for me:</p>
<div class="codehilite"><pre><span></span>test bench_file_serialization_sink ... bench: 129,967,832 ns/iter (+/- 12,956,926)
test bench_mmap_serialization_sink ... bench: 126,248,624 ns/iter (+/- 8,204,924)
</pre></div>



<a name="161852851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161852851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161852851">(Mar 27 2019 at 12:13)</a>:</h4>
<p>so mmap slightly faster</p>



<a name="161852869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161852869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161852869">(Mar 27 2019 at 12:13)</a>:</h4>
<p>on windows it was more like 188ms (file) vs 240ms (mmap)</p>



<a name="161852962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161852962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161852962">(Mar 27 2019 at 12:15)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> that's fine in this case, i.e. there's no real risk here</p>



<a name="161876312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161876312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161876312">(Mar 27 2019 at 16:26)</a>:</h4>
<p>I'd say we use the <code>FileSerializationSink</code> for now. It seems to be OK performance-wise and won't affect memory usage.</p>



<a name="161876338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/161876338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#161876338">(Mar 27 2019 at 16:26)</a>:</h4>
<p>Sounds reasonable to me</p>



<a name="162136966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162136966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162136966">(Mar 30 2019 at 20:08)</a>:</h4>
<p>So the earlier measurements didn't include the <code>QueryCacheHit</code> event and that turns out to be most of the events recorded in the profile. The correct measurements are:</p>
<table>
<thead>
<tr>
<th>Test Case</th>
<th>Time taken</th>
<th>Profile output file size</th>
</tr>
</thead>
<tbody>
<tr>
<td>regex baseline rustc</td>
<td>3.2s</td>
<td><em>N/A</em></td>
</tr>
<tr>
<td>regex baseline rustc + <code>-Z self-profile</code></td>
<td>6.23s</td>
<td>416mb</td>
</tr>
<tr>
<td>regex rustc + <code>measureme</code> + <code>-Z self-profile</code></td>
<td>6.8s</td>
<td>74mb</td>
</tr>
</tbody>
</table>
<p>The captured file has 3,087,550 events of which 87% are <code>QueryCacheHit</code>. We should figure out a better way to capture that data.</p>



<a name="162203911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162203911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162203911">(Apr 01 2019 at 02:31)</a>:</h4>
<p>I've removed the unnecessary double locking which brings us to</p>
<table>
<thead>
<tr>
<th>Test Case</th>
<th>Time taken</th>
<th>Profile output file size</th>
</tr>
</thead>
<tbody>
<tr>
<td>regex baseline rustc</td>
<td>3.2s</td>
<td><em>N/A</em></td>
</tr>
<tr>
<td>regex baseline rustc + <code>-Z self-profile</code></td>
<td>6.23s</td>
<td>416mb</td>
</tr>
<tr>
<td>regex rustc + <code>measureme</code> + <code>-Z self-profile</code></td>
<td>5.7s</td>
<td>74mb</td>
</tr>
</tbody>
</table>



<a name="162222108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162222108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162222108">(Apr 01 2019 at 09:25)</a>:</h4>
<p>yeah that's not good</p>



<a name="162222195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162222195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162222195">(Apr 01 2019 at 09:26)</a>:</h4>
<p>we'll also need to profile where exactly we are spending that time</p>



<a name="162222226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162222226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162222226">(Apr 01 2019 at 09:27)</a>:</h4>
<p>I'd also be interested in how Mmap sink performs in this scenario</p>



<a name="162231367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162231367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162231367">(Apr 01 2019 at 12:00)</a>:</h4>
<p>mmap sink performs much better:</p>
<table>
<thead>
<tr>
<th>Test Case</th>
<th>Time taken</th>
<th>Profile output file size</th>
</tr>
</thead>
<tbody>
<tr>
<td>regex baseline rustc</td>
<td>3.2s</td>
<td><em>N/A</em></td>
</tr>
<tr>
<td>regex baseline rustc + <code>-Z self-profile</code></td>
<td>6.23s</td>
<td>416mb</td>
</tr>
<tr>
<td>regex rustc + <code>measureme</code> + <code>-Z self-profile</code></td>
<td>5.7s</td>
<td>74mb</td>
</tr>
<tr>
<td>regex rustc + <code>measureme</code> + <code>-Z self-profile</code> mmap sink</td>
<td>3.7s</td>
<td>74mb</td>
</tr>
</tbody>
</table>



<a name="162246400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246400">(Apr 01 2019 at 14:58)</a>:</h4>
<p>awesome :)</p>



<a name="162246469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246469">(Apr 01 2019 at 14:59)</a>:</h4>
<p>I have another version of the mmap sink locally which needs some cleanup but might be even faster.</p>



<a name="162246491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246491">(Apr 01 2019 at 14:59)</a>:</h4>
<p>Awesome!</p>



<a name="162246499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246499">(Apr 01 2019 at 14:59)</a>:</h4>
<p>this also tells us that the benchmarks in the crate are no good :)</p>



<a name="162246591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246591">(Apr 01 2019 at 15:00)</a>:</h4>
<p>it still might be interesting to think about multiple verbosity levels for self-profiling</p>



<a name="162246600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246600">(Apr 01 2019 at 15:00)</a>:</h4>
<p>Even a modestly sized crate generates an events file with 1,000,000+ events</p>



<a name="162246635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246635">(Apr 01 2019 at 15:01)</a>:</h4>
<p>does that version already deduplicate strings?</p>



<a name="162246659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246659">(Apr 01 2019 at 15:01)</a>:</h4>
<p>Yeah</p>



<a name="162246661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246661">(Apr 01 2019 at 15:01)</a>:</h4>
<p>i.e. does it allocate a new label string per event?</p>



<a name="162246663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246663">(Apr 01 2019 at 15:01)</a>:</h4>
<p>ok</p>



<a name="162246677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246677">(Apr 01 2019 at 15:01)</a>:</h4>
<p>It dedups query names and event type strings</p>



<a name="162246684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246684">(Apr 01 2019 at 15:01)</a>:</h4>
<p>that's a lot of data apparently :)</p>



<a name="162246701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246701">(Apr 01 2019 at 15:01)</a>:</h4>
<p>The custom <code>GenericEvent</code> labels are not deduplicated</p>



<a name="162246712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246712">(Apr 01 2019 at 15:01)</a>:</h4>
<p>But I don't think there's a lot to be gained there</p>



<a name="162246761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246761">(Apr 01 2019 at 15:02)</a>:</h4>
<p>yes, I think so too</p>



<a name="162246773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246773">(Apr 01 2019 at 15:02)</a>:</h4>
<p>At least currently</p>



<a name="162246825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246825">(Apr 01 2019 at 15:02)</a>:</h4>
<p>maybe we only need to record query cache hit events when also recording individual query keys</p>



<a name="162246850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246850">(Apr 01 2019 at 15:03)</a>:</h4>
<p>that will be super slow anyway</p>



<a name="162246895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246895">(Apr 01 2019 at 15:03)</a>:</h4>
<p>Yeah</p>



<a name="162246916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246916">(Apr 01 2019 at 15:03)</a>:</h4>
<p>We do something similar with the existing cache stats</p>



<a name="162246926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246926">(Apr 01 2019 at 15:03)</a>:</h4>
<p>I haven't had time to look at that PR yet</p>



<a name="162246938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162246938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162246938">(Apr 01 2019 at 15:03)</a>:</h4>
<p>hopefully tomorrow</p>



<a name="162247004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162247004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162247004">(Apr 01 2019 at 15:04)</a>:</h4>
<p>No worries :)</p>



<a name="162247029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162247029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162247029">(Apr 01 2019 at 15:04)</a>:</h4>
<p>I think it's mostly working now there's just some unresolved questions</p>



<a name="162247045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162247045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162247045">(Apr 01 2019 at 15:04)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="162580826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/measureme%20performance/near/162580826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/measureme.20performance.html#162580826">(Apr 05 2019 at 00:04)</a>:</h4>
<p>For anyone following along, I posted some numbers for Windows on <a href="https://github.com/rust-lang/rust/pull/59515#issuecomment-480104925" target="_blank" title="https://github.com/rust-lang/rust/pull/59515#issuecomment-480104925">the PR</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>